package com.ebid.templates.tenn;

import org.json.JSONObject;
import com.ebid.templates.tenn.TenderBulletinPhase;

import java.text.MessageFormat;

public class Test {

    private String test = "{0}";

    private  String tenderBulletinPhaseTem = "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?>\n" +
            "<tenderBulletinPhase>\n" +
            "    <TENDER_PROJECT_CODE>{0}</TENDER_PROJECT_CODE>\n" +
            "    <BID_SECTION_CODES>\n" +
            "    </BID_SECTION_CODES>\n" +
            "    <TENDER_CODE></TENDER_CODE>\n" +
            "    <NOTICE_NAME></NOTICE_NAME>\n" +
            "    <NOTICE_CONTENT></NOTICE_CONTENT>\n" +
            "    <NOTICE_SEND_TIME></NOTICE_SEND_TIME>\n" +
            "    <NOTICE_MEDIA></NOTICE_MEDIA>\n" +
            "    <URL>/</URL>\n" +
            "    <NOTICE_NATURE></NOTICE_NATURE>\n" +
            "    <NOTICE_TYPE></NOTICE_TYPE>\n" +
            "    <DOC_GET_START_TIME></DOC_GET_START_TIME>\n" +
            "    <DOC_GET_END_TIME></DOC_GET_END_TIME>\n" +
            "    <DOC_GET_METHOD></DOC_GET_METHOD>\n" +
            "    <BID_DOC_REFER_END_TIME></BID_DOC_REFER_END_TIME>\n" +
            "    <BID_DOC_REFER_METHOD></BID_DOC_REFER_METHOD>\n" +
            "    <BID_URL></BID_URL>\n" +
            "    <SYNDICATED_FLAG></SYNDICATED_FLAG>\n" +
            "    <IS_POSTPONE></IS_POSTPONE>\n" +
            "    <BID_OPEN_TIME></BID_OPEN_TIME>\n" +
            "    <BID_OPEN_METHOD></BID_OPEN_METHOD>\n" +
            "    <TENDERERS>\n" +
            "    </TENDERERS>\n" +
            "    <TENDER_AGENCYS>\n" +
            "    </TENDER_AGENCYS>\n" +
            "    <OTHER_CONTENT></OTHER_CONTENT>\n" +
            "    <BULLETIN_DUTY>张云良</BULLETIN_DUTY>\n" +
            "    <EXAMINER_NAME>项目经理</EXAMINER_NAME>\n" +
            "    <ATTACHMENT_SET>\n" +
            "    </ATTACHMENT_SET>\n" +
            "    <TRADE_PLAT></TRADE_PLAT>\n" +
            "    <PUB_SERVICE_PLAT_CODE></PUB_SERVICE_PLAT_CODE>\n" +
            "    <SUBMIT_TIMESTAMP></SUBMIT_TIMESTAMP>\n" +
            "</tenderBulletinPhase>";

    public static void main(String[] args) {

        String json = "{\n" +
                "\t\"ATTACHMENT_CODE\": \"4a2acfbc-0ffe-425e-8f7b-b77c73e1fa5c\",\n" +
                "\t\"BID_DOC_REFER_END_TIME\": \"20180627160000\",\n" +
                "\t\"BID_DOC_REFER_METHOD\": \"一次递交\",\n" +
                "\t\"BID_OPEN_METHOD\": \"一步法\",\n" +
                "\t\"BID_OPEN_TIME\": \"20180627160000\",\n" +
                "\t\"BID_URL\": \"同开标地址\",\n" +
                "\t\"BULLETIN_DUTY\": \"华能项目经理01\",\n" +
                "\t\"DOC_GET_END_TIME\": \"20180612160000\",\n" +
                "\t\"DOC_GET_METHOD\": \"网上\",\n" +
                "\t\"DOC_GET_START_TIME\": \"20180607090000\",\n" +
                "\t\"EXAMINER_NAME\": \"杨磊\",\n" +
                "\t\"IS_POSTPONE\": \"0\",\n" +
                "\t\"NOTICE_MEDIA\": \"11\",\n" +
                "\t\"NOTICE_NAME\": \"公共服务平台测试04\",\n" +
                "\t\"NOTICE_NATURE\": \"1\",\n" +
                "\t\"NOTICE_SEND_TIME\": \"20180607090000\",\n" +
                "\t\"NOTICE_TYPE\": \"1\",\n" +
                "\t\"OTHER_CONTENT\": \"\",\n" +
                "\t\"PUB_SERVICE_PLAT_CODE\": \"D3301000385\",\n" +
                "\t\"SUBMIT_TIMESTAMP\": \"20180718235753\",\n" +
                "\t\"SYNDICATED_FLAG\": \"1\",\n" +
                "\t\"TENDER_CODE\": \"ZB046\",\n" +
                "\t\"TENDER_PROJECT_CODE\": \"I3100000021000022ZB0\",\n" +
                "\t\"TRADE_PLAT\": \"I3100000021\",\n" +
                "\t\"URL\": \"无\"\n" +
                "\n" +
                "\n" +
                "}";
        JSONObject jsonObject = new JSONObject(json);
        TenderBulletinPhase tenderProjectPhase = new TenderBulletinPhase();

        tenderProjectPhase.setNOTICE_NAME(jsonObject.get("NOTICE_NAME").toString());

        TenderBulletinPhaseTem tenderBulletinPhaseTem = new TenderBulletinPhaseTem();



        Test test = new Test();
        test.test = MessageFormat.format(test.test,
                            "111"
                );

//        System.out.println(tenderProjectPhase.getNOTICE_NAME());
        System.out.println(test.test);
    }
}
